home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.7 KB | 45 lines | [TEXT/GEOL] |
- Item 3479237 20-June-89 14:09
-
- From: D2086 Efficient Field Svc, C Faith, PRT
-
- To: MACAPP.TECH$ MACAPP Tech
- MACDTS Macintosh Developer Technical Supt.
-
- Sub: Obj. Pascal Implementation ?s
-
- Hello,
-
- I have a couple of Object Pascal questions:
-
- 1) Is there any way to know inside a method If a particular call is the result
- of an INHERITED call of an ancestor subclass of that object or a direct call to
- that classes method?
-
- I have an abstract class called TAbstract. It has a method DoSomething.
-
- I want to write out warnings if method DoSomething is not OVERRIDEN, but no
- warnings if the calls is from an INHERITED statement inside a subclass
- DoSomething method OVERRIDE.
-
- I suspect this is not possible but don't know for certain. It would be a nice
- feature.
-
- 2) Regarding calls to methods inside an object that are in the same segment.
- How is this implemented? Are they JSR calls or do they go through the method
- dispatcher? There is no reason they could not be direct calls but I am not
- sure whether the implementation optimizes for this.
-
- To be more specific. Suppose I have an object TDemo. It has methods MainMethod
- and AuxMethod. If MainMethod calls AuxMethod and they are both in the same
- segment are they implemented as directly as if AuxMethod were merely a routine
- not a method, or does it go through the method tables? Is the linker that
- smart? What about If they are in different segments?
-
- In general, I would like more technical information on the object pascal
- implementation, so I can make more intelligent efficiency decisions.
-
- Curtis Faith
-
-
-
-